Conversation
|
Claude finished @cicr99's task in 12m 42s —— View job Review summaryBlocker (1 issue, posted inline on both Swapping This isn't theoretical — this PR's own CI run already shows it: The underlying race is legitimate and worth fixing, but the fix needs a state accessor that pins to a specific block's global state root while still supporting trie reconstruction — e.g., resolving the state root at |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
This new solution adds a trie-capable state accessor for storage proofs: For full correctness we'd still need the DB snapshots solution |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4064 +/- ##
==========================================
- Coverage 79.47% 79.34% -0.13%
==========================================
Files 466 466
Lines 36015 36035 +20
==========================================
- Hits 28623 28593 -30
- Misses 7383 7433 +50
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

User description
Summary
Fixes a race condition in
starknet_getStorageProofwhen resolvinglatest. (Reference to the comment here)Before this change, the handler read the current chain height, validated the requested block against that height, and then opened
HeadState(). If a new block was accepted between those two operations, the response could use metadata from blocknwhile reading state from blockn + 1.This updates the handler to open state explicitly at the validated block number instead of using the moving head state.
Notes
This is a tactical fix for the existing inconsistency. A longer-term solution would be to use a DB snapshot so the chain height, header/hash lookup, and state access are all served from the same underlying database view.
PR Type
Bug fix, Tests
Description
Pin storage proof state requested height
Add trie reader by block number
Use block-pinned state in storage proof
Update mocks and storage proof tests
File Walkthrough